package Icecream.P9;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author Lenovo
 */
public class Main {
   public static void main(String[] argv) 
   throws Exception {
      List<String> stuff = Arrays.asList("a", "b");
      List list = new ArrayList(stuff);
      list = Collections.unmodifiableList(list);
      try {
         list.set(0, "new value");
      } 
        catch (UnsupportedOperationException ignored) {
      }
       Map map = new HashMap();
       System.out.println("集合现在是只读");
   }
}